/**
 * 为 count 生成 action
 */
// 同步action
export const incrementAction = data => ({type: "increment", data})
export const decrementAction = data => ({type: "decrement", data})

// 异步action
export const incrementAsyncAction = (data, time) => {
  return (dispatch) => {
    setTimeout(() => {
      dispatch(incrementAction(data))
    }, time)
  }
}